﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace LK.WebAPI.LK.WebAPI.ApiResult
{
    public class ResposeStatus
    {
        public string RequestId { get; set; }
        public int Code { get; set; }
        public string Message { get; set; }

        public void Success(string s = "请求成功")
        {
            this.Code = 1;
            this.Message = s;
        }

        public void Error(string s = "请求失败")
        {
            this.Code = -1;
            this.Message = s;
        }
    }

    public class ResposeModel<T> : ResposeStatus
    {
        public int TotalCount { get; set; }
        public T Data { get; set; }
    }
}